Deleted unused files.
[Sonic-Engine-360.git] / GMS2 / Sonic Engine 360 / objects / SpringParent / Draw_0.gml
blob67981d3cb824daec45742ed4dd85b1758b00b762
1 \r
2     animation = action;\r
3 \r
4     //==========================================================\r
5     // Core of the animation system\r
6 \r
7     // If animation changed, change to the new parameters...\r
8     if (animation != animations_old)\r
9     {\r
10         animations_framemin = ani_framemin[animation];\r
11         animations_framemax = ani_framemax[animation];\r
12         animations_return = ani_return[animation];    \r
13         animations_speed = ani_speed[animation];\r
15         animations_frame = animations_framemin;\r
16         animations_timer = 0;\r
17         animations_old = animation;\r
18     }\r
20     // Add to the timer\r
21     animations_timer += animations_speed\r
23     if (animations_timer >= 100)  // Check if we are ready to change of frame\r
24     {    \r
25         animations_timer = 0;\r
26         animations_frame += 1;\r
27         \r
28         if (animations_frame > animations_framemax)\r
29         {\r
30             animations_frame = animations_return;\r
31         }\r
32     }\r
34     // Draw the object\r
35     draw_sprite_ext(sprite_index, animations_frame, x, y, image_xscale, image_yscale, 0, c_white, 1);\r